//
//  ITPhotoSelectAlert.m
//  InTubePro
//
//  Created by seven on 2020/4/22.
//  Copyright © 2020 seven. All rights reserved.
//

#import "ITPhotoSelectAlert.h"

@implementation ITPhotoSelectAlert

- (void)initViews{
    self.itemRect = CGRectMake(0, 20, self.width, 50);
    [super initViews];
    UILabel *topLbl = [UILabel initWithFrame:CGRectMake(100, 0, self.width-200, 55)];
    topLbl.textAlignment = NSTextAlignmentCenter;
    topLbl.font = SemiboldFontWithSize(16);
    topLbl.textColor = COLOR_WHITE;
    //topLbl.text = LocalTitle(@"Select photo");
    [self.contentView addSubview:topLbl];
    self.topView.hidden = YES;
}

- (UIButton *)itemWithModel:(ITSettingModel *)model frame:(CGRect)frame{
    UIButton *btn = [super itemWithModel:model frame:frame];
    btn.contentHorizontalAlignment = UIControlContentHorizontalAlignmentCenter;
    btn.contentEdgeInsets = UIEdgeInsetsZero;
    return btn;
}

- (void)onBtnClick:(UIButton *)sender{
    if (self.customAction) {
        self.customAction(@(sender.tag-100), cat_next);
    }
    [self hideAnimation];
}


@end
